package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RadarSensorMapper;
import com.ruoyi.system.domain.RadarSensor;
import com.ruoyi.system.service.IRadarSensorService;

/**
 * 雷达传感器数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-28
 */
@Service
public class RadarSensorServiceImpl implements IRadarSensorService 
{
    @Autowired
    private RadarSensorMapper radarSensorMapper;

    /**
     * 查询雷达传感器数据
     * 
     * @param id 雷达传感器数据主键
     * @return 雷达传感器数据
     */
    @Override
    public RadarSensor selectRadarSensorById(Long id)
    {
        return radarSensorMapper.selectRadarSensorById(id);
    }

    /**
     * 查询雷达传感器数据列表
     * 
     * @param radarSensor 雷达传感器数据
     * @return 雷达传感器数据
     */
    @Override
    public List<RadarSensor> selectRadarSensorList(RadarSensor radarSensor)
    {
        return radarSensorMapper.selectRadarSensorList(radarSensor);
    }

    /**
     * 新增雷达传感器数据
     * 
     * @param radarSensor 雷达传感器数据
     * @return 结果
     */
    @Override
    public int insertRadarSensor(RadarSensor radarSensor)
    {
        radarSensor.setCreateTime(DateUtils.getNowDate());
        return radarSensorMapper.insertRadarSensor(radarSensor);
    }

    /**
     * 修改雷达传感器数据
     * 
     * @param radarSensor 雷达传感器数据
     * @return 结果
     */
    @Override
    public int updateRadarSensor(RadarSensor radarSensor)
    {
        return radarSensorMapper.updateRadarSensor(radarSensor);
    }

    /**
     * 批量删除雷达传感器数据
     * 
     * @param ids 需要删除的雷达传感器数据主键
     * @return 结果
     */
    @Override
    public int deleteRadarSensorByIds(Long[] ids)
    {
        return radarSensorMapper.deleteRadarSensorByIds(ids);
    }

    /**
     * 删除雷达传感器数据信息
     * 
     * @param id 雷达传感器数据主键
     * @return 结果
     */
    @Override
    public int deleteRadarSensorById(Long id)
    {
        return radarSensorMapper.deleteRadarSensorById(id);
    }
}
